<template>
  <section>
    <div class="operation-header-icon" @click="getUrl()">
      <img src="../assets/icon-left.png" class="operation-header-icon-img" />
    </div>
    <div class="operation-header">
      <div>{{title}}</div>
    </div>
    <div class="operation-header-right">使用中
      <div class="switch" :class="{'switch-t':flag}"  @click.stop="flagChang()">
        <div class="switch-con" :class="{'switch-con-t':flag}"></div>
      </div>
    </div>
  </section>

</template>

<script>
export default {
  props: {
    title: String,
    flag: Boolean
  },
  data () {
    return {
      checked: true
    }
  },
  methods: {
    getUrl () {
      this.$router.go(-1)
    },
    flagChang () {
      this.$emit('flagChang')
    }
  }
}
</script>

<style scoped>
.operation-header{
  /* background: #fff; */
  color: #202020;
  font-size: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 690px;
  height: 110px;
  padding-left: 30px;
  padding-right: 30px;
}
.operation-header-icon{
  position: fixed;
  z-index: 999;
  left: 32px;
  width:20px;
  height:35px;
}
.operation-header-icon-img{
  width:20px;
  height:35px;
}
.operation-header-right{
  height: 110px;
  position: fixed;
  right: 30px;
  display: flex;
  align-items: center;
  font-size: 26px;
  color: #666;
}
.switch{
  width: 55px;
  height: 32px;
  background:#ABABAB;
  border-radius:16px;
  display: flex;
  align-items: center;
  margin-left: 3px;
}
.switch-con{
  width:28px;
  height:28px;
  background:#fff;
  border-radius:50%;
  margin-left: 2px;
}
.switch-t{
  width: 55px;
  height: 32px;
  background:linear-gradient(35deg,rgba(0,186,255,1),rgba(11,155,238,1));
  border-radius:16px;
  display: flex;
  align-items: center;
}
.switch-con-t{
  width:28px;
  height:28px;
  background:#fff;
  border-radius:50%;
  margin-left: 25px;
}
</style>
